package cn.jiyun.feign;

import cn.jiyun.dto.CourseDTO;
import cn.jiyun.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author 季乾帅
 * @create 2023/8/25 14:07
 */
@Component
@FeignClient(name = "Course")
public interface CourseFeign {


    @GetMapping("course/findKec")
    public Result findKec();

    @PostMapping("course/findKecPage")
    public Result findKecPage(@RequestParam("tid") String tid ,@RequestBody CourseDTO courseDTO);

    @PostMapping("course/findZuixin")
    public Result findZuixin(@RequestBody CourseDTO courseDTO);


    @PostMapping("course/zuixin")
    public Result zuix(@RequestBody CourseDTO courseDTO);

    @GetMapping("course/findPageType")
    public Result findPageType(@RequestParam("cid") Integer cid);

    @PostMapping("course/findMyCourse")
    public Result findMyCourse(@RequestParam(value = "userId") String userId, @RequestBody CourseDTO dto);
}
